
// const { Sequelize, DataTypes } = require("sequelize");
const { STRING, INTEGER, LSTRING } = require('../types')

module.exports = (sequelize) => {
  const comment = sequelize.define(
    'comment',
    {// 在这里定义模型属性
      id: {
        type: INTEGER,
        primaryKey:true,
        autoIncrement:true,
        allowNull:false
      },
      aligntime: {type: STRING,},
      content: {type: LSTRING,},
      articleId: {type: STRING,},
      articleName: {type: STRING,},
      userId: {type: STRING},
    },
    {
    tableName: "comment",//直接提供表名
    timestamps: false
   }
  );
  return comment
}
